import itertools
class Solution:
    def isasc(self, seq):
        for i in range(len(seq)-1):
            if seq[i] > seq[i+1]:
                return False
        return True

    def issame(self, seq1, seq2):
        for s1, s2 in zip(seq1, seq2):
            if s1 != s2:
                return False
        return True

    def remove_same(self, seqs):
        seqs = sorted(seqs)
        res = []
        for i in range(len(seqs)-1):
            if not self.issame(seqs[i], seqs[i+1]):
                res.append(seqs[i])
        if len(seqs) > 0:
            res.append(seqs[-1])
        return res

    def findSubsequences(self, nums: 'List[int]') -> 'List[List[int]]':
        res = []
        for i in range(2, len(nums)+1):
            res.extend(self.remove_same([j for j in itertools.combinations(nums, i) if self.isasc(j)]))
        return res